Skip to content

Avoid copy file when building libsass #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2017

Conversation

am11
Copy link
Contributor

@am11 am11 commented Jan 14, 2017

Simplifies build

@am11
Copy link
Contributor Author

am11 commented Jan 14, 2017

Build passing https://ci.appveyor.com/project/am11/libsass-net/build/1.0.162

@darrenkopp, should we configure AppVeryor CI with GitHub pull request so the build status is visible?

<Target Name="AfterBuild">
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
<Copy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I've since hit with this one is DLL in use stuff, so it might be work setting the SkipUnchangedFiles="true"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree; however, most time is consumed on force compilation of LibSass project twice in LibSass.Net.csproj, since we are compiling everytime regardless of C/C++ source changes. The real difference at (solution level or even a single dependent project level) build time would be made when we use Rebuild instead of Build target there in MSBuild task which builds libsass. We cannot do that right now as Rebuild whips out the previous build artifacts (x64 rebuild will delete x86 build artifacts, regardless the TargetFile for x64 has different name..).

Another reason not to compile for many platforms at once.

Going forward, build for every architecture at single compile-time is neither feasible to build nor to test (x86, x64 and in future ARM, ARM64 etc. and then OS Linux-glibc, Linux-musl-libc, Mac, Windows etc. in future..) We would need to build one platform at a time (#47). Fixing #47 is next thing on my todo, after this PR is merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think probably in Debug it should only compile the current achitecture, and leave the full matrix for the Release. Separate stuff though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate stuff

I have added SkipUnchangedFiles with 16b8f1c.

The problem may still persist as SkipUnchangedFiles checks for modified timestamp to detect the change, which in this case the DLL always gets build and modified so we might not get the desired effect unless we start building for one platform. Hence <MSBuild target="Rebuild" will ultimately fix this problem. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this only helps when your doing a Project Build instead of a Solution build. Thanks for fixing it though!

@darrenkopp darrenkopp merged commit 72a0578 into sass:master Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants